﻿using CMS.Services.Models;

namespace CMS.Services.DTO.User
{
    public class RegisterReponseUserModel : BaseReponseModel
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        public string UserPassword { get; set; }
        /// <summary>
        /// 用户真实姓名
        /// </summary>
        public string UserRealName { get; set; }
        /// <summary>
        /// 用户别名
        /// </summary>
        public string UserAliasName { get; set; }
        /// <summary>
        /// 用户身份证号
        /// </summary>
        public string UserIDCard { get; set; }

        /// <summary>
        /// 用户手机号
        /// </summary>
        public string UserTel { get; set; }
        /// <summary>
        /// 用户家庭地址
        /// </summary>
        public string UserHomeAddress { get; set; }
        /// <summary>
        /// 用户家庭所在省
        /// </summary>
        public string Province { get; set; }
        /// <summary>
        /// 用户家庭所在市
        /// </summary>
        public string City { get; set; }
        /// <summary>
        /// 用户家庭所在县
        /// </summary>
        public string Country { get; set; }
        /// <summary>
        /// 用户家庭所在国家
        /// </summary>
        public string Nation { get; set; }

        public static implicit operator RegisterReponseUserModel(UserModel model)
        {
            return null == model ? null : new RegisterReponseUserModel()
            {
                Id = model.Id,
                CreateTime = model.CreateTime,
                ModifyTime = model.ModifyTime,
                UserName = model.UserName,
                //UserPassword = model.UserPassword,
                UserRealName = model.UserRealName,
                UserAliasName = model.UserAliasName,
                UserIDCard = model.UserIDCard,
                UserTel = model.UserTel,
                UserHomeAddress = model.UserHomeAddress,
                Province = model.Province,
                City = model.City,
                Country = model.Country,
                Nation = model.Nation,
            };
        }
    }
}
